# Contributor: Jordan Christiansen <xordspar0@gmail.com>
# Maintainer: Jordan Christiansen <xordspar0@gmail.com>
pkgname=flatpak-xdg-utils
pkgver=1.0.5
pkgrel=0
pkgdesc="Simple portal-based commandline tools for use inside flatpak sandboxes"
url="https://github.com/flatpak/flatpak-xdg-utils"
arch="all"
license="LGPL-2.1-only"
makedepends="meson glib-dev"
checkdepends="dbus"
source="https://github.com/flatpak/flatpak-xdg-utils/releases/download/$pkgver/flatpak-xdg-utils-$pkgver.tar.xz"

build() {
	abuild-meson \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	mv $pkgdir/usr/bin/xdg-email $pkgdir/usr/bin/flatpak-xdg-email
	mv $pkgdir/usr/bin/xdg-open $pkgdir/usr/bin/flatpak-xdg-open
}

sha512sums="
71c55cc01dc962c1b419821160626c46111ad672241f7627dbf780790d4f9f320151f479264ffc188334488f43dee8f4f7aa7754040e9c6231c200ea281f6439  flatpak-xdg-utils-1.0.5.tar.xz
"
